<template>
  <div>
    <div>table组件</div>
    <s-table
      :columns="tableColumnData"
      :tableData="tableData"
      :getDataWay="getDataWay"
      @getTableListData="getTableListData"
      selection
      index
    >
      <template #default="scope">
        <el-button link type="primary" size="small" @click="handleClick"
          >Detail</el-button
        >
        <el-button link type="primary" size="small">Edit</el-button>
      </template>
    </s-table>
  </div>
</template>

<script setup lang="ts">
import STable from "@/components/Table/index.vue";
import { settleApplyManagementQuery } from "@/api/applicaiton.ts";
// import axios from "axios";
const handleClick = () => {};
const tableData = ref([]);
const tableColumnData = ref([
  {
    label: "入驻申请单号",
    name: "applno",
    width: "200",
  },
  {
    label: "入驻申请时间",
    name: "ctm",
    width: "150",
  },
  {
    label: "渠道商户名称",
    name: "mernm",
    width: "150",
  },
  {
    label: "入驻状态",
    name: "applysts",
    width: "150",
  },
  {
    label: "内部审核状态",
    name: "audsts",
    width: "150",
  },
  {
    label: "审核意见",
    name: "ckrsn",
    width: "150",
  },
  {
    label: "入驻更新时间",
    name: "utm",
    width: "150",
  },
  {
    label: "入驻关单方式",
    name: "clsts",
    width: "150",
  },
  {
    label: "详情",
    name: "action",
    solt: "operation",
    width: "300",
  },
]);
// axios
//   .post("/settleApplyManagement/query")
//   .then((res) => {
//     console.log(res);
//   })
//   .catch((errr) => {
//     console.log(errr);
//   });
const getDataWay = {
  dataType: "url",
  data: settleApplyManagementQuery,
  param: {
    pageNum: 1, //当前页码
    pageSize: 10, // 每页展示数量
  },
  tableRequest: false,
};
const getTableListData = (data: any) => {
  // console.log(data);
  tableData.value = data;
};
// onMounted(() => {
//   getTableListData();
// });
</script>

<style scoped lang="scss"></style>
